//Basic
import row from './Row/index';
import col from './Col/index';

import aside from './aside/index';
import container from './container/index';
import footer from './footer/index';
import header from './header/index';
import main from './main/index';

import icon from './Icon/index';

import button from './Button/index';

import link from './Link/index';

//Form
import radio from './radio/index';
import radioGroup from './radio-group/index';
import radioButton from './radio-button/index';

import checkbox from './checkbox/index';
import checkboxGroup from './checkbox-group/index';
import checkboxButton from './checkbox-button/index';

import input from './Input/index';
import inputNumber from './input-number/index';

import select from './Select/index';
import option from './Option/index';

import Switch from './switch/index';
import slider from './slider/index';
import rate from './rate/index';

import form from './form/index';
import formItem from './form-item/index';

//Data
import table from './table/index';
import tableColumn from './table-column/index';
import tag from './tag/index';
import progress from './progress/index';
import pagination from './pagination/index';
import badge from './badge/index';
import avatar from './avatar/index';
import skeleton from './skeleton/index';
import empty from './empty/index';
import descriptions from './descriptions/index';
import descriptionsItem from './descriptions-item/index';
import result from './result/index';

//Notice
import alert from './alert/index';
import Message from './message/index';
import MessageBox from './message-box/index';
import Notification from './notification/index';

//Navigation
import tabs from './tabs/index';
import tabPane from './tab-pane/index';
import breadcrumb from './breadcrumb/index';
import breadcrumbItem from './breadcrumb-item/index';
import pageHeader from './page-header/index';
import steps from './steps/index';
import step from './step/index';

//Others
import dialog from './dialog/index';
import card from './card/index';
import collapse from './collapse/index';
import collapseItem from './collapse-item/index';
import timeline from './timeline/index';
import timelineItem from './timeline-item/index';
import divider from './divider/index';
import image from './image/index';
import backtop from './backtop/index';

//导入css
import '../style/index.scss'

const components = {
	//Basic
	row,
	col,
	aside,
	container,
	footer,
	header,
	main,
	icon,
	button,
	link,

	//Form
	radio,
	radioGroup,
	radioButton,
	checkbox,
	checkboxGroup,
	checkboxButton,
	input,
	inputNumber,
	select,
	option,
	Switch,
	slider,
	rate,
	form,
	formItem,
	
	//Data
	table,
	tableColumn,
	tag,
	progress,
	pagination,
	badge,
	avatar,
	skeleton,
	empty,
	descriptions,
	descriptionsItem,
	result,

	//Notice
	alert,

	//Navigation
	tabs,
	tabPane,
	breadcrumb,
	breadcrumbItem,
	pageHeader,
	steps,
	step,

	//Others
	dialog,
	card,
	collapse,
	collapseItem,
	timeline,
	timelineItem,
	divider,
	image,
	backtop,
};
const install = (Vue) => {
	Object.values(components).forEach(component => {
		Vue.component(component.name, component);
	});
	Vue.prototype.$message = Message;
	Vue.prototype.$MessageBox = MessageBox;
	Vue.prototype.$alert = MessageBox.alert;
	Vue.prototype.$confirm = MessageBox.confirm;
	Vue.prototype.$prompt = MessageBox.prompt;
	Vue.prototype.$notify = Notification;
};

let ygbh = {
	install: install
};

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
}

export default ygbh;

export {components};

export { install };